﻿using UnityEngine;
using System.Collections;

namespace Util
{

    public class ControlUtil : Object
    {

        /// <summary>
        /// 将屏幕坐标转换为控件坐标
        /// </summary>
        /// <param name="postion"></param>
        /// <returns></returns>
        public static Vector3 CoordScreenToWorld(Vector3 postion)
        {
            Vector3 worldPos = Camera.main.ScreenToWorldPoint(postion);
            //  Debug.Log("ScreenToWorldPoint:" + worldPos);
            return worldPos;
        }
    }
}
